home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 15
/
Aminet 15 - Nov 1996.iso
/
Aminet
/
comm
/
mail
/
U_JoinThor14.lha
/
U-Join.thor
< prev
Wrap
Text File
|
1996-09-15
|
3KB
|
166 lines
/* $VER: U-Join v1.4 by Vincent O'Malley (13/9/96) */
/* Edit these 3 lines for your system setup */
UData = 'BBS0/PassConf.data' /* Main directory for PassConf.data */
Tempfile = 'Ram:T/Utemp' /* desination for temp file */
EnJoin = Y /* N to disable Search/Join requester */
/* Do not edit anything below this unless you know what your doing */
/* check FOR rexxsupport.library */
IF ~ Show('l','rexxsupport.library') THEN
DO
CALL AddLib('rexxsupport.library',0,-30,0)
END
OPTIONS RESULTS
/* Get THOR path */
ADDRESS(REXX)
Open(path,'env:thor/thorpath','r')
THORpath = ReadLn(path)
CALL Close('env:thor/thorpath')
Open(thordat,'env:thor/BBSDataPath','r')
DATApath = ReadLn(thordat)
CALL Close('env:thor/BBSDataPath')
/* Check TO see IF BBSREAD lib is loaded */
IF ~ Show('p','BBSREAD') THEN
DO
ADDRESS command "run >nil: "THORpath"bin/LoadBBSRead"
"Waitforport BBSREAD"
END
/* Get Current system */
ADDRESS(Thor.01)
CURRENTSYSTEM stem CURRENT
IF rc ~ = 0 THEN
DO
SAY THOR.LASTERROR
EXIT
END
BBS = CURRENT.BBSNAME
/* Search or Join requester */
IF EnJoin = Y THEN
DO
REQUESTNOTIFY '"Do you want to Search or Join"' BT '"_Search|_Cancel|_Join"'
IF RESULT = 1 THEN CALL Search
IF RESULT = 0 THEN CALL Join
IF RESULT = 2 THEN EXIT
END
Search:
/* Get search string */
ADDRESS(Thor.01)
REQUESTSTRING TITLE '"Search String"' BT '"OK|Cancel"'
IF rc=5 THEN
DO
EXIT
END
string = RESULT
/* Search PassConf.data */
ADDRESS(REXX)
ADDRESS command
'search NONUM' DATApath||UData string' >'Tempfile
/* Read result of search */
i = 0
CALL Open(Utext,Tempfile,'r')
DO WHILE ~Eof(Utext)
i=i+1
FOUND.i = ReadLn(Utext)
END
CALL Close(Utext)
CALL Delete(Tempfile)
i = i - 1
/* Check to see if any groups where found */
ADDRESS(Thor.01)
FOUND.COUNT = i
TEST = Words(FOUND.1)
IF test = 0 THEN
DO
REQUESTNOTIFY TEXT '"No Groups FOUND"' BT '"_Ok"'
EXIT
END
/* Selection List */
REQUESTLIST INSTEM FOUND OUTSTEM SAVE MULTISELECT TITLE '"Listed Groups"'
IF (RC > 0) THEN
DO
REQUESTNOTIFY TEXT '"No Groups Selected"' BT '"_Ok"'
EXIT
END
/* Write UserNet Events */
ADDRESS(BBSREAD)
DO i=1 TO SAVE.COUNT
EVE_JOINCONF=2
DROP GROUP.
GROUP.CONFERENCE=SAVE.i
WRITEBREVENT BBSNAME BBS EVENT EVE_JOINCONF STEM GROUP
IF rc ~=0 THEN
DO
SAY BBSREAD.LASTERROR
EXIT
END
END
EXIT
Join:
REQUESTSTRING TITLE '"Joining Confrence"' BT '"OK|Cancel"'
IF rc=5 THEN
DO
EXIT
END
ADDRESS(BBSREAD)
EVE_JOINCONF=2
DROP CON.
CON.CONFERENCE = RESULT
WRITEBREVENT BBSNAME BBS EVENT EVE_JOINCONF STEM CON
IF rc ~=0 THEN
DO
SAY BBSREAD.LASTERROR
EXIT
END
EXIT